﻿using Microsoft.Practices.Prism.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace FridgeManagerApp
{
    [DataContract]
    public class WExceptionNote : NotificationObject
    {
        private int exceptionUID;
        private int dominoUID;
        private int status;
        private String exceptionTime;

        [DataMember(Order = 0)]
        public int ExceptionUID
        {
            get
            {
                return exceptionUID;
            }
            set
            {
                exceptionUID = value;
                RaisePropertyChanged("ExceptionUID");
            }
        }

        [DataMember(Order = 1)]
        public int DominoUID
        {
            get
            {
                return dominoUID;
            }
            set
            {
                dominoUID = value;
                RaisePropertyChanged("DominoUID");
            }
        }

        [DataMember(Order = 2)]
        public int Status
        {
            get
            {
                return status;
            }
            set
            {
                status = value;
                RaisePropertyChanged("Status");
            }
        }

        [DataMember(Order = 3)]
        public String ExceptionTime
        {
            get
            {
                return exceptionTime;
            }
            set
            {
                exceptionTime = value;
                RaisePropertyChanged("ExceptionTime");
            }
        }

        public WExceptionNote()
        {
            ExceptionUID = -1;
            DominoUID = -1;
            Status = -1;
            ExceptionTime = "";
        }

        public WExceptionNote(LExceptionNote p)
        {
            ExceptionUID = p.ExceptionUID;
            DominoUID = p.DominoUID;
            Status = p.Status;
            ExceptionTime = p.ExceptionTime;
        }
    }
}
